/*
 * @Author: 13177709051 3506463075@qq.com
 * @Date: 2024-10-23 19:06:33
 * @LastEditors: 13177709051 3506463075@qq.com
 * @LastEditTime: 2024-10-23 19:40:56
 * @FilePath: /linux22/fifo/client.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include "namedPipe.hpp"

//write
int main()
{
    NamePiped fifo(comm_path, User);
    if(fifo.OpenForWrite())
    {
        std::cout << "client open named pipe done" << std::endl;
        while(true)
        {
            std::cout << "Please Enter > ";
            std::string message;
            std::getline(std::cin, message);
            fifo.WriteNamePipe(message);
        }
    }
    return 0;
}